﻿@{
    ViewBag.Title = "ProductAdd";
}
@section head
{
    <script src="@Url.Content("~/ScriptPlugin/validate/validate.js")"></script>
    <link href="@Url.Content("~/ScriptPlugin/validate/validate.css")" rel="stylesheet" />
    <script type="text/javascript" src="@Url.Content("~/Scripts/form2json.js")"></script>
    <script type="text/javascript">
    function SaveData(index) {
            if (K.Validate())
            {
                var dto = $('#productForm').serializeJson();
                K.AjaxJson("@Url.Content("~/Customer/Product/ProductInsert")", dto, function (result) {
                    if (K.ShowOrAlert(result)) {
                        parent.K.layer.callback(index, dto);
                        parent.K.layer.close(index);
                    }
                });
            }
    }
    </script>
}
<form action="" id="productForm" name="productForm">
    <div class="content-form">
        <table class="content-table"> 
            <tr>
                <th><span>产品名称/品种</span></th>
                <td>
                    <input type="hidden" id="CustomerId" name="CustomerId" value="@ViewBag.CustomerId" />
                    <input type="hidden" id="Id" name="Id" value="@Guid.NewGuid()" />
                    <input type="text" data-valid="required" id="Name" name="Name" />
                </td>
                <th>年产量/销售量</th>
                <td>
                    <input type="text"  id="SaleWeight" value="0" name="SaleWeight" />
                </td>
            </tr>
            <tr>
                <th>需钢材量</th>
                <td>
                    <input type="text" id="NeedSteelWeight" name="NeedSteelWeight" />
                </td>
                <th>
                   
                </th>
                <td>
                   
                </td>
            </tr>
            <tr>
                <th>使用钢材品种</th>
                <td>
                    <input type="text" id="UseSteelType" name="UseSteelType" />
                </td>
                <th>
                    使用钢材品种单耗
                </th>
                <td>
                    <input type="text" id="Consumption" name="Consumption" />
                </td>
            </tr>
        </table>
    </div>
</form>
